<?php
/**
 * 分类
 * author：www.tong-kuai.com
 */
namespace Api\Controller;

use Think\Controller;

class TermController extends Controller {

    protected $term_model;

    function __construct() {
        parent::__construct();
        $this->term_model = D("Portal/Terms");
    }

    /**
     * 获取所有分类
     */
    public function getTerms(){
        $terms = $this->term_model->where(array("status"=>"1"))->order(array("listorder"=>"asc"))->select();
        exit(json_encode(array('terms'=>$terms)));
    }
}

